<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <script src="./vue.js"></script>
    <script>
        /*
            v-on:事件名="处理函数"
            处理函数：必须是一个vue对象方法
        */ 
      new Vue({
        el: "#app",
        template: `
            <div>
                hello  {{title}}  
                <button v-on:click="say">click</button>
            </div>
            `,
        data: {
          title: " jack",
        },
        methods: {
          say() {
            console.log("hello say");
          },
        },
      });
    </script>
  </body>
</html>
